<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var yue=prompt("请输入月份","1");
        switch(yue){
            case '3':
            case '4':
            case '5':
                   alert("3~5月为春");
                   break;
                   
            case '6':
            case '7':
            case '8':
                   alert("3~8月为夏");
                   break;
            case '9':
            case '10':
            case '11':
                   alert("9~11月为秋");
                   break;
            case '12':
            case '1':
            case '2':
                   alert("12~2月为冬");
                   break;
            default:
                 alert("请输入正确的月份");
        }
    </script>
</body>
</html>